if (!String.format) {
  String.format = function (format) {
    let args = Array.prototype.slice.call(arguments, 1);
    return format.replace(/{(\d+)}/g, function (match, number) {
      return typeof args[number] != 'undefined'
        ? args[number]
        : match
        ;
    });
  };
}

export default {
  //自定义节流操作
  ReClick: {
    mounted(el: any, binding: any) {
      // console.log("ReClick==>", el, binding)
      // console.log("ReClick==>", el.className, binding)
      el.addEventListener('click', () => {
        console.log("ReClick==>", binding.value)
        console.log("ReClick==>", el.disabled)
        if (el.className.indexOf('disabled-class') == -1) {
          el.className = el.className + " disabled-class";
          setTimeout(() => {
            el.className = el.className.replace(" disabled-class", "")
          }, binding.value || 1200)
        }
      })
    }
  }
}
